package cn.zysheep.singleton.demo3;

/**
 * @ClassName: Singleton
 * @Description: 懒汉式 单例模式 线程不安全的
 * @Author: lyw
 * @Date: 2022/10/17 21:42
 */
public class Singleton {
    private static Singleton singleton;

    private Singleton(){};

    public static Singleton getInstance() {
        if (singleton == null) {
            singleton = new Singleton();
        }
        return singleton;
    }
}
